<?php

/**
 * @package     JohnCMS
 * @link        http://johncms.com
 * @copyright   Copyright (C) 2008-2011 JohnCMS Community
 * @license     LICENSE.txt (see attached file)
 * @version     VERSION.txt (see attached file)
 * @author      http://johncms.com/about
 */

define('_IN_JOHNCMS', 1);

require('../incfiles/core.php');
$lng_profile = core::load_lng('profile');

/*
-----------------------------------------------------------------
Закрываем от неавторизованных юзеров
-----------------------------------------------------------------
*/
if (!$user_id) {
    require('../incfiles/head.php');
    echo functions::display_error($lng['access_guest_forbidden']);
    require('../incfiles/end.php');
    exit;
}

/*
-----------------------------------------------------------------
Получаем данные пользователя
-----------------------------------------------------------------
*/
$user = functions::get_user($user);
if (!$user) {
    require('../incfiles/head.php');
    echo functions::display_error($lng['user_does_not_exist']);
    require('../incfiles/end.php');
    exit;
}

/*
-----------------------------------------------------------------
Переключаем режимы работы
-----------------------------------------------------------------
*/
$array = array(
    'activity'  => 'includes/profile',
    'ban'       => 'includes/profile',
    'edit'      => 'includes/profile',
    'images'    => 'includes/profile',
    'info'      => 'includes/profile',
    'ip'        => 'includes/profile',
    'guestbook' => 'includes/profile',
    'karma'     => 'includes/profile',
    'office'    => 'includes/profile',
    'password'  => 'includes/profile',
    'reset'     => 'includes/profile',
    'settings'  => 'includes/profile',
    'stat'      => 'includes/profile',
    'friends'   => 'includes/profile'
);
$path = !empty($array[$act]) ? $array[$act] . '/' : '';
if (array_key_exists($act, $array) && file_exists($path . $act . '.php')) {
    require_once($path . $act . '.php');
} else {
    /*
    -----------------------------------------------------------------
    Анкета пользователя
    -----------------------------------------------------------------
    */
    $headmod = 'profile,' . $user['id'];
    $textl = $lng['profile'] . ': ' . htmlspecialchars($user['name']);
    require('../incfiles/head.php');
    
    //Уведомление о дне рожденья
    if ($user['dayb'] == date('j', time()) && $user['monthb'] == date('n', time())) {
        echo '<div class="gmenu">' . $lng['birthday'] . '!!!</div>';
    }

    // Информация о юзере
    $arg = array(
        'lastvisit' => 1,
        'iphist'    => 1
    );

    if ($user['id'] != core::$user_id) {
        $arg['footer'] = '<span class="gray">' . core::$lng['where'] . ':</span> ' . functions::display_place($user['id'], $user['place']);
    }

    echo '<div class="user"><p>' . functions::display_user($user, $arg) . '</p></div>';
    // Если юзер ожидает подтверждения регистрации, выводим напоминание
    if ($rights >= 7 && !$user['preg'] && empty($user['regadm'])) {
        echo '<div class="rmenu">' . $lng_profile['awaiting_registration'] . '</div>';
    }
    

	echo '<div class="blockModule"><h3>Bán Clip</h3>'.
			'<div class="block-cont">' .
				'<img src="http://tiennhanh.com/banner/clip-hot-52x52.png" title="Clip 18+" alt="Clip 18+" style="float:left;padding-right:10px;"/>'.
				'<div style="float:left;"><b>Phân phối Clip 18+:</b> Ứng dụng xem Video, Clip trên điện thoại với hàng ngàn nội dung phong phú.<br />' .
				'Hỗ trợ: <b>Java</b>, <b>Android</b>, <b>IOS</b><br />' .
				'Đơn giá: <span style="font-weight: bold; color: red;">15.000 - 4.800đ</span><br /></div>'. 
		'</div></div>';
	//'<a href="/Dich-vu/clip/index">Xem kho clip HOT trên Tiennhanh.com »</a>' .       
	
	echo '<div class="linkDownload">
			<h3>Link tải</h3>
			<div class="getlinkContent">
				<p><input type="text" value="http://tiennhanh.com/u/' . $user['id'] . '/" style="width: 98%; padding: 7px 5px;" id="" name="" class="copyPaste" /></p>

				<p><a href="http://tiennhanh.com/u/' . $user['id'] . '/" target="_blank">» Tải ngay (Tự động trả ứng dụng theo hệ điều hành máy)</a></p>
			</div>
		</div>';
	
	echo '<div class="linkDownload">
			<h3>Mã nhúng</h3>
			<div class="getlinkContent">
				<div style="background: none repeat scroll 0% 0% #F3F3F3; border: 1px solid rgb(230, 212, 161); margin-bottom: 10px; padding: 5px 5px 15px;">
					<div style="float: left; margin: 3px 10px 0pt 0pt;"><a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/"><img src="http://tiennhanh.com/banner/clip-hot-48x48.png" title="Clip 18+" alt="Clip 18+" /></a></div>
					<div style="font-size: 120%; font-weight: bold;"><a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(0, 0, 0); margin-bottom: 5px;">Clip 18+</a></div>
					<div>
						<a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(0, 0, 0);">Ứng dụng xem Clip 18+ với kho dữ liệu phim khổng lồ cho người trên 18 tuổi</a><br />
						<a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(255, 0, 0); font-weight: bold;">Tải miễn phí</a>
					</div>
				</div>
				<p><input type="text" value="&lt;div style=&quot;background:#F3F3F3;border:1px solid #E6D4A1;margin-bottom:10px;padding:5px 5px 15px 5px;&quot;&gt;            &lt;div style=&quot;float:left;margin:3px 10px 0 0;&quot;&gt;&lt;a href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;&lt;img alt=&quot;Clip 18+&quot; title=&quot;Clip 18+&quot; src=&quot;http://tiennhanh.com/banner/clip-hot-48x48.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;            &lt;div style=&quot;font-size:120%;font-weight:bold;&quot;&gt;&lt;a style=&quot;color:#000000;margin-bottom:5px;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Clip 18+&lt;/a&gt;&lt;/div&gt;            &lt;div&gt;                &lt;a style=&quot;color:#000000;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Ứng dụng xem Clip 18+ với kho dữ liệu phim khổng lồ cho người trên 18 tuổi&lt;/a&gt;&lt;br /&gt;                &lt;a style=&quot;color:#FF0000;font-weight: bold;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Tải miễn phí&lt;/a&gt;            &lt;/div&gt;        &lt;/div&gt;" style="width: 98%; padding: 7px 5px;" class="copyPaste"/></p>
				
				<div style="background: none repeat scroll 0% 0% #F3F3F3; border: 1px solid rgb(230, 212, 161); margin-bottom: 10px; padding: 5px 5px 15px;">
					<div style="float: left; margin: 3px 10px 0pt 0pt;"><a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/"><img src="http://tiennhanh.com/banner/clip-hot-52x52.png" title="Clip 18+" alt="Clip 18+" /></a></div>
					<div style="font-size: 120%; font-weight: bold;"><a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(0, 0, 0); margin-bottom: 5px;">Clip 18+</a></div>
					<div>
						<a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(0, 0, 0);">Ứng dụng xem Clip 18+ với kho dữ liệu phim khổng lồ cho người trên 18 tuổi</a><br />
						<a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(255, 0, 0); font-weight: bold;">Tải miễn phí</a>
					</div>
				</div>
				<p><input type="text" value="&lt;div style=&quot;background:#F3F3F3;border:1px solid #E6D4A1;margin-bottom:10px;padding:5px 5px 15px 5px;&quot;&gt;            &lt;div style=&quot;float:left;margin:3px 10px 0 0;&quot;&gt;&lt;a href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;&lt;img alt=&quot;Clip 18+&quot; title=&quot;Clip 18+&quot; src=&quot;http://tiennhanh.com/banner/clip-hot-52x52.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;            &lt;div style=&quot;font-size:120%;font-weight:bold;&quot;&gt;&lt;a style=&quot;color:#000000;margin-bottom:5px;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Clip 18+&lt;/a&gt;&lt;/div&gt;            &lt;div&gt;                &lt;a style=&quot;color:#000000;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Ứng dụng xem Clip 18+ với kho dữ liệu phim khổng lồ cho người trên 18 tuổi&lt;/a&gt;&lt;br /&gt;                &lt;a style=&quot;color:#FF0000;font-weight: bold;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Tải miễn phí&lt;/a&gt;            &lt;/div&gt;        &lt;/div&gt;" style="width: 98%; padding: 7px 5px;" class="copyPaste"/></p>
				
				<div style="background: none repeat scroll 0% 0% #F3F3F3; border: 1px solid rgb(230, 212, 161); margin-bottom: 10px; padding: 5px; overflow: hidden;">
					<div style="float: left; margin: 3px 10px 0pt 0pt;"><a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/"><img src="http://tiennhanh.com/banner/clip-hot-100x100.png" title="Clip 18+" alt="Clip 18+" /></a></div>
					<div style="font-size: 120%; font-weight: bold;"><a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(0, 0, 0); margin-bottom: 5px;">Clip 18+</a></div>
					<div style="margin-top: 10px;">
						<a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(0, 0, 0);">Lượt xem: 30249</a><br />
						<a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(0, 0, 0);">Ứng dụng xem Clip 18+ với kho dữ liệu phim khổng lồ cho người trên 18 tuổi</a>
					</div>
					<div style="margin-top: 10px;">
						<a title="Clip 18+" href="http://tiennhanh.com/u/' . $user['id'] . '/" style="color: rgb(255, 0, 0); font-weight: bold;">Tải miễn phí</a>
					</div>
				</div>
				<p><input type="text" value="&lt;div style=&quot;background:#F3F3F3;border:1px solid #E6D4A1;margin-bottom:10px;padding:5px;overflow:hidden;&quot;&gt;            &lt;div style=&quot;float:left;margin:3px 10px 0 0;&quot;&gt;&lt;a href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;&lt;img alt=&quot;Clip 18+&quot; title=&quot;Clip 18+&quot; src=&quot;http://tiennhanh.com/banner/clip-hot-100x100.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;            &lt;div style=&quot;font-size:120%;font-weight:bold;&quot;&gt;&lt;a style=&quot;color:#000000;margin-bottom:5px;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Clip 18+&lt;/a&gt;&lt;/div&gt;            &lt;div style=&quot;margin-top: 10px;&quot;&gt;                &lt;a style=&quot;color:#000000;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Lượt xem: 30249&lt;/a&gt;&lt;br /&gt;                &lt;a style=&quot;color:#000000;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Ứng dụng xem Clip 18+ với kho dữ liệu phim khổng lồ cho người trên 18 tuổi&lt;/a&gt;            &lt;/div&gt;            &lt;div style=&quot;margin-top: 10px;&quot;&gt;                &lt;a style=&quot;color:#FF0000;font-weight: bold;&quot; href=&quot;http://tiennhanh.com/u/' . $user['id'] . '/&quot; title=&quot;Clip 18+&quot;&gt;Tải miễn phí&lt;/a&gt;            &lt;/div&gt;        &lt;/div&gt;" style="width: 98%; padding: 7px 5px;" class="copyPaste"/></p>
				
			</div>
		</div>';
}

require_once('../incfiles/end.php');